package org.example.service;


import jakarta.annotation.Resource;
import org.example.dao.IFoodRepository;
import org.example.entity.Food;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FoodService { //service可以抽象成接口
    @Resource
    private IFoodRepository foodRepository;
    public List<Food> findAllByBusinessId(Integer businessId){
        return foodRepository.findAllByBusinessId(businessId);
    }

    public Food findByFoodId(Integer foodId){
        return foodRepository.findByFoodId(foodId);
    }


}
